/* 储存合同管理-基础设置相关请求 */

import { ajaxService } from '@/utils/request';
import { PostContractSettingItem } from '../type';

const env = import.meta.env;
let baseURL = env.VITE_CONTRACT_URL;

/* ----------------------------------- ---------------------------------------------------------------------------------------------------------*/

/* 合同 类型 设置模块  */

// 获取 合同类型 设置数据
export function GetContractTypeSetting() {
  return ajaxService({
    url: '/contract/GetConType',
    method: 'get',
    baseURL,
  });
}

// 添加 合同类型 控件
export function PostContractTypeSettingItem(data: PostContractSettingItem) {
  return ajaxService({
    url: '/contract/AddConType',
    method: 'post',
    baseURL,
    data,
  });
}

// 删除 合同类型 控件
export function DeleteContractTypeSettingItem(id: number) {
  return ajaxService({
    url: `/contract/DeleteConType?id=${id}`,
    method: 'delete',
    baseURL,
  });
}

/* ----------------------------------- ---------------------------------------------------------------------------------------------------------*/
